VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{736A8444-E374-41A8-B526-1B07FD2F3F5B}#1.0#0"; "BLacKPeaRLOCX.ocx"
Begin VB.Form FrmAppBlock 
   BorderStyle     =   0  'None
   Caption         =   "App Blocker"
   ClientHeight    =   4440
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   5040
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4440
   ScaleWidth      =   5040
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame1 
      Height          =   4455
      Left            =   0
      TabIndex        =   7
      Top             =   0
      Width           =   5055
      _ExtentX        =   8916
      _ExtentY        =   7858
      BackColor1      =   0
      BackColor2      =   4210752
      Caption         =   "App Blocker"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   49152
      TitleColor1     =   0
      TitleColor2     =   4210752
      TitleGradient   =   2
      TitleHeight     =   350
      BorderColor     =   49152
      BorderWidth     =   2
      Begin VB.TextBox txtapp 
         BackColor       =   &H00404040&
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   250
         Left            =   270
         TabIndex        =   1
         Top             =   3210
         Width           =   2415
      End
      Begin VB.TextBox txtnoclient 
         BackColor       =   &H00404040&
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   250
         Left            =   1590
         TabIndex        =   0
         Top             =   645
         Width           =   735
      End
      Begin MSComctlLib.ListView lstapp 
         Height          =   1575
         Left            =   240
         TabIndex        =   9
         Top             =   1320
         Width           =   4575
         _ExtentX        =   8070
         _ExtentY        =   2778
         View            =   3
         LabelWrap       =   -1  'True
         HideSelection   =   -1  'True
         _Version        =   393217
         ForeColor       =   49152
         BackColor       =   0
         BorderStyle     =   1
         Appearance      =   1
         NumItems        =   3
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Text            =   "No"
            Object.Width           =   882
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   1
            Text            =   "Application Name"
            Object.Width           =   3528
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   2
            Text            =   "Status"
            Object.Width           =   5292
         EndProperty
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdClear 
         Height          =   375
         Left            =   3960
         TabIndex        =   3
         Top             =   3150
         Width           =   855
         _ExtentX        =   1508
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   "Bersih"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmAppBlock.frx":0000
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdadd 
         Height          =   375
         Left            =   2880
         TabIndex        =   2
         Top             =   3150
         Width           =   855
         _ExtentX        =   1508
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   "Tambah"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmAppBlock.frx":001C
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdstop 
         Height          =   375
         Left            =   1920
         TabIndex        =   5
         Top             =   3720
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   "Berhenti"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmAppBlock.frx":0038
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix CmdBatal 
         Height          =   375
         Left            =   3600
         TabIndex        =   6
         Top             =   3720
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   "Tutup"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmAppBlock.frx":0054
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdActive 
         Height          =   375
         Left            =   240
         TabIndex        =   4
         Top             =   3720
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   "Mulai"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmAppBlock.frx":0070
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin VB.Shape Shape2 
         BackColor       =   &H00004040&
         BackStyle       =   1  'Opaque
         BorderColor     =   &H00C0FFC0&
         Height          =   345
         Left            =   240
         Shape           =   4  'Rounded Rectangle
         Top             =   3165
         Width           =   2490
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H00004040&
         BackStyle       =   1  'Opaque
         BorderColor     =   &H00C0FFC0&
         Height          =   345
         Left            =   1560
         Shape           =   4  'Rounded Rectangle
         Top             =   600
         Width           =   810
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "List Application"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   1080
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "Nomor Client"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   600
         Width           =   1335
      End
   End
End
Attribute VB_Name = "FrmAppBlock"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdActive_Click()
On Error GoTo hell
    rec.Open "SELECT ip.*,port.port FROM ip,port WHERE ip.ip = port.ip AND ip.no_client = " & Val(txtnoclient.Text), conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            If FrmMain.Winsock(rec(2)).State = sckConnected Then
                FrmMain.Winsock(rec(2)).SendData "actblock|_|_|_|_|_|_|"

        End If
        End If
        rec.Close
Unload Me
IfNoErr:
Exit Sub
hell:
 TulisError Err.Description, Err.Number, " ", Me.Name
Resume IfNoErr

End Sub

Private Sub cmdadd_Click()
On Error GoTo hell
If txtapp.Text = vbNullString Then
Exit Sub
Else
Set Vbutir = lstapp.ListItems.Add(, , lstapp.ListItems.Count + 1 & ".")
    Vbutir.SubItems(1) = txtapp.Text
   Vbutir.SubItems(2) = "Wating For Activating"
    rec.Open "SELECT ip.*,port.port FROM ip,port WHERE ip.ip = port.ip AND ip.no_client = " & Val(txtnoclient.Text), conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            If FrmMain.Winsock(rec(2)).State = sckConnected Then
                FrmMain.Winsock(rec(2)).SendData "strblock|" & txtapp.Text
                    

        End If
        End If
        rec.Close
    
txtapp.Text = ""
End If
IfNoErr:
Exit Sub
hell:
 TulisError Err.Description, Err.Number, " ", Me.Name
Resume IfNoErr

End Sub

Private Sub CmdBatal_Click()
Unload Me
End Sub

Private Sub cmdClear_Click()
On Error GoTo hell
lstapp.ListItems.Clear
    rec.Open "SELECT ip.*,port.port FROM ip,port WHERE ip.ip = port.ip AND ip.no_client = " & Val(txtnoclient.Text), conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            If FrmMain.Winsock(rec(2)).State = sckConnected Then
                FrmMain.Winsock(rec(2)).SendData "clsblock|_|_|_|_|_|_|"
        End If
        End If
        rec.Close
IfNoErr:
Exit Sub
hell:
 TulisError Err.Description, Err.Number, " ", Me.Name
Resume IfNoErr

End Sub

Private Sub cmdstop_Click()
On Error GoTo hell
    rec.Open "SELECT ip.*,port.port FROM ip,port WHERE ip.ip = port.ip AND ip.no_client = " & Val(txtnoclient.Text), conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            If FrmMain.Winsock(rec(2)).State = sckConnected Then
                FrmMain.Winsock(rec(2)).SendData "stpblock|_|_|_|_|_|_|"
                  

        End If
        End If
        rec.Close
Unload Me
IfNoErr:
Exit Sub
hell:
 TulisError Err.Description, Err.Number, " ", Me.Name
Resume IfNoErr

End Sub

Private Sub Form_Load()
StyleS
End Sub

Private Sub txtapp_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdadd_Click
End If
End Sub

Private Sub StyleS()
On Error Resume Next
Dim ctrl As Control
For Each ctrl In Controls
If FrmStyles.txtnamastyle.Text = "Default" Then
Exit Sub
Else

    If (TypeOf ctrl Is ButtonNix) And _
        ctrl.Name <> "cmdSwitchStyle" Then
        ctrl.ButtonType = FrmStyles.txtlButtonType.Text
        ctrl.ColorScheme = FrmStyles.txtlColorScheme.Text
        ctrl.Backcolor = FrmStyles.txtlBackcolor.Text
        ctrl.BackOver = FrmStyles.txtlBackOver.Text
        ctrl.Forecolor = FrmStyles.txtlForecolor.Text
        ctrl.ForeOver = FrmStyles.txtlForeOver.Text
       
    End If
        If (TypeOf ctrl Is BLacKFrame) And _
        ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.BackColor1 = FrmStyles.frameBackColor1.Text
         ctrl.BackColor2 = FrmStyles.frameBackColor2.Text
         ctrl.BorderColor = FrmStyles.frameBorderColor.Text
         ctrl.Forecolor = FrmStyles.frameForecolor.Text
         ctrl.TitleColor1 = FrmStyles.frameTitleColor1.Text
         ctrl.TitleColor2 = FrmStyles.frameTitleColor2.Text
         If FrmStyles.frameBackGradient.Text = 0 Then
         ctrl.BackGradient = None
         ElseIf FrmStyles.frameBackGradient.Text = 1 Then
         ctrl.BackGradient = Vertical
         ElseIf FrmStyles.frameBackGradient.Text = 2 Then
         ctrl.BackGradient = Horizontal
         End If
         
         If FrmStyles.Frametitlegradient.Text = 0 Then
         ctrl.TitleGradient = None
         ElseIf FrmStyles.Frametitlegradient.Text = 1 Then
         ctrl.TitleGradient = Vertical
         ElseIf FrmStyles.Frametitlegradient.Text = 2 Then
         ctrl.TitleGradient = Horizontal
         End If

    End If
        If (TypeOf ctrl Is BLacKText) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.TForecolor.Text
         ctrl.Backcolor = FrmStyles.TBackcolor.Text
         ctrl.BackColorMain = FrmStyles.TBackColorMain.Text
         ctrl.BorderColor = FrmStyles.TBorderColor.Text
         ctrl.FocusBackColor = FrmStyles.TFocusBackColor.Text
         ctrl.FocusBackMainColor = FrmStyles.TFocusBackMainColor.Text
         ctrl.FocusBorderColor = FrmStyles.TFocusBorderColor.Text
         ctrl.FocusForeColor = FrmStyles.TFocusForeColor.Text
    End If
        If (TypeOf ctrl Is MSFlexGrid) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.GDBackcolor.Text
         ctrl.BackColorBkg = FrmStyles.GDBackColorBkg.Text
         ctrl.BackColorSel = FrmStyles.GDBackColorSel.Text
         ctrl.BackColorFixed = FrmStyles.GDBackColorFixed.Text
         ctrl.ForeColorSel = FrmStyles.GDForeColorSel.Text
         ctrl.Forecolor = FrmStyles.GDForecolor.Text
         ctrl.ForeColorFixed = FrmStyles.GDForeColorFixed.Text
         ctrl.GridColor = FrmStyles.GDGridColor.Text
         ctrl.GridColorFixed = FrmStyles.GDGridColorFixed.Text
    End If
        If (TypeOf ctrl Is TextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lbltextfore.Text
         ctrl.Backcolor = FrmStyles.lbltextback.Text
    End If
        If (TypeOf ctrl Is ComboBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.cboForeColor.Text
         ctrl.Backcolor = FrmStyles.cboBackcolor.Text
    End If
        If (TypeOf ctrl Is Label) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lblForeColor.Text
    End If
        If (TypeOf ctrl Is RichTextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.RcBackcolor.Text
    End If
    
            If (TypeOf ctrl Is OptionButton) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.opForecolor.Text
         ctrl.Backcolor = FrmStyles.opBackcolor.Text
    End If
            If (TypeOf ctrl Is ListView) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.LBackColor.Text
    End If
    Me.Backcolor = FrmStyles.WFore.Text
    End If
Next ctrl
End Sub

Private Sub txtnoclient_Change()
If Val(txtnoclient.Text) > ClientMax Then
txtnoclient.Text = ClientMax
End If
End Sub
Private Sub txtnoclient_GotFocus()
txtnoclient.Backcolor = &H0&
txtnoclient.Forecolor = vbWhite
End Sub
Private Sub txtnoclient_LostFocus()
txtnoclient.Backcolor = &H404040
txtnoclient.Forecolor = &HC000&
End Sub

